import React from "react";
import { RouteObject } from "@/routes/interface";
import Layout from "@/layouts";
import lazyLoad from "@/routes/utils/lazyLoad";

const device: Array<RouteObject> = [
	{
		element: <Layout />,
		meta: {
			title: "设备管理",
			key: "device"
		},
		children: [
			{
				path: "/device/car",
				element: lazyLoad(React.lazy(() => import("@/pages/device/Car/index"))),
				meta: {
					title: "车辆管理",
					requiresAuth: true,
					key: "/device/car",
					icon: ""
				}
			},
			{
				path: "/device/car/detail",
				element: lazyLoad(React.lazy(() => import("@/pages/device/CarDetail/index"))),
				meta: {
					title: "车辆详情",
					requiresAuth: true,
					key: "/device/car/detail",
					icon: ""
				}
			},
			{
				path: "/device/v2x",
				element: lazyLoad(React.lazy(() => import("@/pages/device/VTwoX/index"))),
				meta: {
					title: "V2X设备管理",
					requiresAuth: true,
					key: "/device/v2x",
					icon: ""
				}
			},
		]
	}
];

export default device;
